import Vue from 'vue'
//引入APP作为全局最大的父组件
import App from './App.vue'
// import basc from './shitu/basc.vue' //引入basc作为子组件
Vue.config.productionTip = false
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

//注册全局事件
import child from "./components/child.vue"
import son3 from "./components/son3"
Vue.component('comchild', child,)

import VueRouter from "vue-router";//注册router
Vue.use(VueRouter)

const originalPush = VueRouter.prototype.push;// 是指路由重复。

VueRouter.prototype.push = function push(location) {// 修改 原型对象中的push方法
  return originalPush.call(this, location).catch(err => err)
};
Vue.component('son3', son3)
// Vue.component('basc', basc)//引用子组件

import router from './js/router'// 引用路由

import store from './shitu/store'//引用vuex

import axios from "axios"// 全局axios
Vue.prototype.$axios = axios;
new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')